package org.traccar.protocol;

import org.junit.jupiter.api.Test;
import org.traccar.ProtocolTest;

public class Dsf22ProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        var decoder = inject(new Dsf22ProtocolDecoder(null));

        verifyPositions(decoder, binary(
                "4642a82d01c8f6aa1af1792c0c1411eb61001e0000"));

        verifyPositions(decoder, binary(
                "4642000101A8EE5F0ECA5FF421B33F524E32610401"));

        verifyPositions(decoder, binary(
                "4642000103A8EE5F0ECA5FF421B33F524E326104010216600EFC92F421B63F524E366104013238600E1EBEF421B93F524E35610401"));

        verifyPositions(decoder, binary(
                "46422f5a28f28292f6c602e61499325f6500970700f28292f6c602e6149e325f6500970700f28292f6c602e614a3325f6500980700f28292f6c602e614a8325f6500970700f28292f6c602e614ad325f6500970700f28292f6c602e614b2325f65009b0700f28292f6c602e614b7325f65008d0700f28292f6c602e614bc325f6500980700f28292f6c602e614c1325f6500980700f28292f6c602e614c6325f6500970700f28292f6c602e614cb325f6500990700f28292f6c602e614d0325f6500980700f28292f6c602e614d5325f6500990700f28292f6c602e614da325f6500980700f28292f6c602e614df325f6500990700f28292f6c602e614e4325f6500980700f28292f6c602e614ea325f6500970700f28292f6c602e614ef325f6500980700f28292f6c602e614f4325f6500980700f28292f6c602e614f9325f6500990700f28292f6c602e614fe325f6500990700f28292f6c602e61403335f6500990700f28292f6c602e61408335f6500980700f28292f6c602e6140d335f6500970700f28292f6c602e61412335f6500980700f28292f6c602e61417335f6500980700f28292f6c602e6141c335f6500990700f28292f6c602e61421335f6500980700f28292f6c602e61426335f6500970700f28292f6c602e6142b335f6500980700f28292f6c602e61430335f6500980700f28292f6c602e61435335f6500980700f28292f6c602e6143a335f6500990700f28292f6c602e6143f335f6500980700f28292f6c602e61444335f6500980700f28292f6c602e61449335f6500970700f28292f6c602e6144e335f6500980700f28292f6c602e61453335f6500970700f28292f6c602e61458335f6500980700f28292f6c602e6145d335f6500970700"));

    }

}
